#include "Complex.h"

template<typename T>
Complex<T>::Complex() {}

template<typename T>
Complex<T>::Complex(T a, T b)
{
    this->a = a;
    this->b = b;
}

template<typename T>
Complex<T> Complex<T>::operator+(Complex &obj)
{
    Complex tmp(a + obj.a, b + obj.b);
    return tmp;
}

template<typename T>
ostream &operator<<(ostream &out, const Complex<T> &obj)
{
    out<<obj.a<<" + "<<obj.b<<"i";
    return out;
}

template<typename T>
Complex<T> mySub(Complex<T> &a, Complex<T> &b)
{
    Complex<T> tmp(a.a - b.a, a.b - b.b);
    return tmp;
}
